﻿using System;
using System.Collections.Generic;

namespace FBProjectTest.MockObjects.MSProject
{
    public class DocumentPropertiesMock : Microsoft.Office.Core.DocumentProperties
    {
        private Dictionary<string, Microsoft.Office.Core.DocumentProperty> InternalDocumentProperties = new Dictionary<string, Microsoft.Office.Core.DocumentProperty>();

        public Microsoft.Office.Core.DocumentProperty Add(string Name, bool LinkToContent, [System.Runtime.InteropServices.OptionalAttribute]object Type, [System.Runtime.InteropServices.OptionalAttribute]object Value, [System.Runtime.InteropServices.OptionalAttribute]object LinkSource)
        {
            return Add(Name, LinkToContent, (Microsoft.Office.Core.MsoDocProperties)Type, Value);
        }

        public Microsoft.Office.Core.DocumentProperty Add(string Name, bool LinkToContent, Microsoft.Office.Core.MsoDocProperties Type, object Value)
        {
            var property = new DocumentPropertyMock(Name, Type, Value);
            InternalDocumentProperties.Add(Name, property);
            return property;
        }

        public int Count
        {
            get { return InternalDocumentProperties.Count; }
        }

        public System.Collections.IEnumerator GetEnumerator()
        {
            return InternalDocumentProperties.GetEnumerator();
        }

        public Microsoft.Office.Core.DocumentProperty this[object Index]
        {
            get { return InternalDocumentProperties[(string)Index]; }
        }

        #region Not Implemented Microsoft.Office.Core.DocumentProperties Members

        public object Application
        {
            get { throw new NotImplementedException(); }
        }

        public int Creator
        {
            get { throw new NotImplementedException(); }
        }

        public object Parent
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}
